package com.hwadee.property.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.IsAutoIncrement;
import com.gitee.sunchenbin.mybatis.actable.annotation.IsKey;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.command.BaseModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import java.util.Date;
import java.util.LinkedHashMap;

@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "user")//用户表
public class User extends BaseModel {
    @TableId(type = IdType.AUTO)//mybatis-plus主键注解
    @IsAutoIncrement   //自增
    @IsKey             //actable主键注解
    @Column(comment = "用户ID")//对应数据库字段，不配置name会直接采用属性名作为字段名comment是注解
    private Long id;

    @TableField(exist = false)
    private LinkedHashMap<String, String> orderBy;

    @TableField(exist = false)
    private int currentPage;

    @TableField(exist = false)
    private int pageSize;

    @TableField(exist = false)
    private int start;

    @Column(comment = "用户姓名")
    private String name;
    @Column(comment = "用户账号")
    private String account;
    @Column(comment = "用户密码")
    private String password;
    @Column(comment = "用户性别")
    private String sex;
    @Column(comment = "用户年龄")
    private Integer age;
    @Column(comment = "用户身份证号码")
    private String identification;
    @Column(comment = "用户手机号码")
    private String phone;
    @Column(comment = "用户邮箱")
    private String email;
    @Column(comment = "用户所在小区id")
    @TableField("community_id")
    private Long communityId;
    @Column(comment = "用户类型,1---业主，2---物业")
    @TableField("user_type")
    private Integer userType;
    @Column(comment = "用户创建时间")
    @TableField("create_time")
    private String createTime;
    @Column(comment = "用户信息更新时间")
    @TableField("update_time")
    private String updateTime;
    @Column(comment = "是否冻结")
    private Integer freeze;
}
